Page({
  data: {
    list: []
  },
  onLoad () {
    wx.utils.toast('hello world')
  },
  async onShow () {
    this.getListAPI()
  },
  async getListAPI () {
    const { data, code } = await wx.http.get('/announcement')
    if (code !== 10000) {
      return wx.utils.toast('请求失败')
    }
    this.setData({
      list: data
    })
    console.log(code)
  }
})
